Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Active System Manager Release 8.2 API Reference Guide

PDF

Get the current timezone

require 'ASMConfig'
                              
                              # Get timezone settings
                              url = ASM::API::URI("/Timezone")
                              
                              response = ASM::API::sign {  
                              RestClient.get url
                              }
                              # Save it for future use as a payload 
                              payload = ASM::Payload.from_xml(response)
                              payload.save_xml('timezone.xml')
                              
                              
                           

Here we utilize a block construct to sign our request. All RestClient invocations inside the sign block will automatically be signed. The url is specified simply as ‘/Timezone’ because ASM has already been configured with the base path prefix /Asm/V1. The response object as XML is:

<timeZone>
                              <timeZone>(UTC-06:00) Central Time (US & Canada)</timeZone>
                              <timeZoneId>11</timeZoneId>
                              </timeZone>
                              
                           

which we saved in the file ‘timezone.xml’ as a payload used in the next example to set the timezone.


Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\